package cz.uvn.orthopedy.client.entity;

import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.gwt.user.client.rpc.IsSerializable;

@PersistenceCapable
public class Operation implements IsSerializable {

    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    @Extension(vendorName="datanucleus", key="gae.encoded-pk", value="true")
    private String id;
	
	@Persistent
	private Type type;

	@Persistent
	private String symbol;

	@Persistent
	private String diagnosisCode;

	@Persistent
	private String diagnosis;

	@Persistent
	private String implant;

	@Persistent
	private Transfusion transfusion;

	@Persistent
	private Anestesia anestesia;

	@Persistent
	private boolean atb;

	@Persistent
	private boolean rtg;

	@Persistent
	private boolean turnistle; // TODO get to know real word

	@Persistent
	private boolean diabetes;

	@Persistent
	private boolean septic;

	@Persistent
	private boolean pozHbsAg;

	@Persistent
	private String internalComplications;

	public Operation() {
	}

	public Operation(String id, Type type, String symbol, String diagnosisCode,
			String diagnosis, String implant, Transfusion transfusion,
			Anestesia anestesia, boolean atb, boolean rtg, boolean turnistle,
			boolean diabetes, boolean septic, boolean pozHbsAg, String internalComplications) {
		this.id = id;
		this.type = type;
		this.symbol = symbol;
		this.diagnosisCode = diagnosisCode;
		this.diagnosis = diagnosis;
		this.implant = implant;
		this.transfusion = transfusion;
		this.anestesia = anestesia;
		this.atb = atb;
		this.rtg = rtg;
		this.turnistle = turnistle;
		this.diabetes = diabetes;
		this.septic = septic;
		this.pozHbsAg = pozHbsAg;
		this.internalComplications = internalComplications;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Type getType() {
		return type;
	}

	public void setType(Type type) {
		this.type = type;
	}

	public String getSymbol() {
		return symbol;
	}

	public void setSymbol(String symbol) {
		this.symbol = symbol;
	}

	public String getDiagnosisCode() {
		return diagnosisCode;
	}

	public void setDiagnosisCode(String diagnosisCode) {
		this.diagnosisCode = diagnosisCode;
	}

	public String getDiagnosis() {
		return diagnosis;
	}

	public void setDiagnosis(String diagnosis) {
		this.diagnosis = diagnosis;
	}

	public String getImplant() {
		return implant;
	}

	public void setImplant(String implant) {
		this.implant = implant;
	}

	public Transfusion getTransfusion() {
		return transfusion;
	}

	public void setTransfusion(Transfusion transfusion) {
		this.transfusion = transfusion;
	}

	public Anestesia getAnestesia() {
		return anestesia;
	}

	public void setAnestesia(Anestesia anestesia) {
		this.anestesia = anestesia;
	}

	public boolean isAtb() {
		return atb;
	}

	public void setAtb(boolean atb) {
		this.atb = atb;
	}

	public boolean isRtg() {
		return rtg;
	}

	public void setRtg(boolean rtg) {
		this.rtg = rtg;
	}

	public boolean isTurnistle() {
		return turnistle;
	}

	public void setTurnistle(boolean turnistle) {
		this.turnistle = turnistle;
	}

	public boolean isDiabetes() {
		return diabetes;
	}

	public void setDiabetes(boolean diabetes) {
		this.diabetes = diabetes;
	}

	public boolean isSeptic() {
		return septic;
	}

	public void setSeptic(boolean septic) {
		this.septic = septic;
	}

	public boolean isPozHbsAg() {
		return pozHbsAg;
	}

	public void setPozHbsAg(boolean pozHbsAg) {
		this.pozHbsAg = pozHbsAg;
	}

	public String getInternalComplications() {
		return internalComplications;
	}

	public void setInternalComplications(String internalComplications) {
		this.internalComplications = internalComplications;
	}

	// Typ vykonu
	public enum Type {
		TEP,
		Big {
			@Override
			public String toString() {
				return "Velký Výkon";
			}
		},
		Medium {
			@Override
			public String toString() {
				return "Strední Výkon";
			}
		},
		Small {
			@Override
			public String toString() {
				return "Malý Výkon";
			}
		},
		ASKb {
			@Override
			public String toString() {
				return "ASK Velký Výkon";
			}
		},
		ASKm {
			@Override
			public String toString() {
				return "ASK Strední Výkon";
			}
		},
		ASKs {
			@Override
			public String toString() {
				return "ASK Malý Výkon";
			}
		},
		ASKpb {
			@Override
			public String toString() {
				return "ASK Plastika Velký Výkon";
			}
		},
		ASKpm {
			@Override
			public String toString() {
				return "ASK Plastika Strední Výkon";
			}
		},
		ASKps {
			@Override
			public String toString() {
				return "ASK Plastika Malý Výkon";
			}
		},
		TR {
			@Override
			public String toString() {
				return "Traumatologie";
			}
		},
		TRs {
			@Override
			public String toString() {
				return "Traumatologie Septika";
			}
		},
		Septika {
			@Override
			public String toString() {
				return "Septika";
			}
		}
	}

	// Transfuze
	public enum Transfusion {
		PK, EM, MP
	}

	// Anastezie
	public enum Anestesia {
		ET, SPINAL, LOCAL
	}

}
